﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data;
using MySql.Data.MySqlClient;

namespace LibFriesland_Campina_CRM
{
    class DalPrivilege
    {
        //Webservice
        public static List<BizPrivilege> getAll()
        { 
            Friesland_Campina_CRM_DataContext db= new Friesland_Campina_CRM_DataContext(new MySqlConnection(Thuvien.getConnString()));
            var privileges = from p in db.Privilege
                             select new BizPrivilege(p.PrivilegeCharID,p.Name);
            return privileges.ToList();
        }
    }
}
